package request

import "github.com/Sir-yuChen/funAnalyse/model"

// UserLogin 登录入参
type UserLogin struct {
	CustomerName  string `json:"customerName,omitempty" example:"super"`                                 //用户名
	MobileNo      string `binding:"omitempty,checkPhone"json:"mobileNo,omitempty" example:"18739473139"` // 手机号
	Captcha       string `json:"captcha,omitempty" example:"123456" `                                    // 验证码
	LoginPassword string `binding:"required" json:"loginPassword,omitempty" example:"123456"`            // 密碼
	LoginType     string `binding:"oneof=pwd mobile" json:"loginType,omitempty" example:"pwd"`           // 登录方式  pwd/mobile
}

// UserRegister 注册
type UserRegister struct {
	CustomerName    string `binding:"required" json:"customerName,omitempty"  example:"test123"`
	MobileNo        string `binding:"len=11,required" json:"mobileNo,omitempty" example:"18739473139"`
	Email           string `json:"email,omitempty" example:"24708386394@qq.com"`
	Status          string `json:"status,omitempty" example:"Y"`
	LoginPassword   string `binding:"required" json:"loginPassword,omitempty" example:"123456"`
	RegisterChannel string `json:"registerChannel,omitempty" example:"PC"` //注册渠道 PC/APP
}

// UserInfoById GetById Find by id structure
type UserInfoById struct {
	CustomerId string `binding:"required" json:"customerId,omitempty"  example:"test123"`
}
type UpdateUserInfo struct {
	VerificationCode string `binding:"required" json:"verificationCode,omitempty" example:"566667"` //校验验证码
	MobileNo         string `json:"mobileNo,omitempty" example:"18739473139"`
	LoginPassword    string `json:"loginPassword,omitempty" example:"1234"`
	IpAddr           string `binding:"required" json:"ipAddr,omitempty" example:"127.0.0.1"`
	Type             string `binding:"required,oneof=pwd mobile" json:"type,omitempty" example:"pwd"` //修改用户手机号 phone  密码pwd
}

// UserInfoList 查用户集合
type UserInfoList struct {
	Fields   string `json:"fields,omitempty"`                //导出字段
	AllField string `json:"allField,omitempty"`              //是否返回所有字段 默认true
	Export   string `json:"export,omitempty" example:"true"` //是否导出数据 true/false 默认false
	User     model.StockUser
}
